﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/user/User.master" AutoEventWireup="true"
    CodeFile="ViewUser.aspx.cs" Inherits="admin_user_ViewUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="SettingHeading" runat="Server">
    View User
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TheForm" runat="Server">
   <%-- <link href="/css/agent.css" rel="stylesheet" type="text/css" />--%>
    <div class="a-field">
        <label>
            Search By <span class="vtip a-tooltip" title="Choose the criteria that you want to search for">(?)</span></label>
        <div class="a-select">
            <asp:DropDownList ID="ddlSearchFor" runat="server" AutoPostBack="true"
                onselectedindexchanged="ddlSearchFor_SelectedIndexChanged">
                <asp:ListItem>Username</asp:ListItem>
                <asp:ListItem>Project Name</asp:ListItem>
                <asp:ListItem>Bug ID</asp:ListItem>
                <asp:ListItem>Full Name</asp:ListItem>
                <asp:ListItem>Email</asp:ListItem>
                <asp:ListItem>Role</asp:ListItem>
                <asp:ListItem>Organization</asp:ListItem>
                <asp:ListItem>Custome Info</asp:ListItem>
            </asp:DropDownList>
        </div>
    </div>
        <div class="<asp:Literal ID="ltrtextSearch" runat="server"></asp:Literal>">
           <div class="a-field">
            <label>Search Info </label>
              <div class="a-text"><asp:TextBox ID="txtSearch" runat="server"></asp:TextBox></div>
              <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="a-button" OnClick="btnSearch_Click" Style="padding: 6px 10px; margin-left: 20px;" />
            </div>
        </div>
    <div class="<asp:Literal ID="ltrProjecID" runat="server"></asp:Literal>">
    <div class="a-field">
        <label>
            Project ID
        </label>
        <div class="a-select">
            <asp:DropDownList ID="ddlProjectID" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlProjectID_SelectedIndexChanged">
            </asp:DropDownList>
        </div>
    </div>
    </div>
    <div class="<asp:Literal ID="ltrBugID" runat="server"></asp:Literal>">
    <div class="a-field">
        <label>
            Bug ID
        </label>
        <div class="a-select">
            <asp:DropDownList ID="ddlBugID" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlBUgID_SelectedIndexChanged">
            </asp:DropDownList>
        </div>
    </div>
    </div>
    <div class="<asp:Literal ID="ltrRole" runat="server"></asp:Literal>">
          <div class="a-field">
        <label>
           Role
        </label>
        <div class="a-select">
            <asp:DropDownList ID="ddlRole" runat="server" AutoPostBack="true"
                onselectedindexchanged="ddlRole_SelectedIndexChanged">
            </asp:DropDownList>
        </div>
    </div>
    </div>
    <div  id="viewimg-user-admin-page" class="a-fields">
      <asp:ListView ID="LVDisplay" runat="server" >
          <EmptyDataTemplate>
              <table runat="server" style="">
                  <tr>
                      <td>
                          No user Found !!!</td>
                  </tr>
              </table>
          </EmptyDataTemplate>
           <LayoutTemplate>
               <div id="ticket_filter_list_header" class="ticket_filter_list_header">
                    <span class="listview_User_Username " >User</span>
                    <span class="listview_User_Fullname ">FullName </span>
                    <span class="listview_User_Role ">Role </span>
                    <span class="listview_User_Email ">Email </span>
                    <span class="listview_User_Organization ">Organization </span>
                    <span class="listview_User_image scrollbar_mover">Image </span>
                    <span class="listview_User_Active ">Active </span>
                    <span class="listview_User_Action ">Actions </span>
                </div>
               <div id="ticket_filter_list_items_outer_div" class="ticket_filter_list_items table_view">
                    <div id="ticket_filter_list_items_data_div">
                        <div id="ticket_filter_list_items">
                            <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
                        </div>
                        <div id="ticket_filter_item_paginator">
                            Page
                            <asp:DataPager ID="DataPager" PageSize="10" runat="server">
                                <Fields>
                                    <asp:NumericPagerField ButtonCount="10" PreviousPageText="«" NextPageText="»" />
                                </Fields>
                            </asp:DataPager>
                        </div>
                    </div>
                </div>
            </LayoutTemplate>
            <ItemTemplate>
                <!-- first item, selected -->
                <div class="ticket_filter_item ticket_filter_item_table_view">
                    <!-- User Name -->
                    <span class="listview_User_Username lesser_data"> <a href="/Bug.aspx?id=<%# Eval("Username") %>"><%# Eval("Username")%></a></span>
                    <!-- Full Name -->
                    <span class="listview_User_Fullname lesser_data"><%# Eval("Fullname")%></span>
                    <!-- Role -->
                    <span class="lesser_data listview_User_Role lesser_data" style="margin-top: 1px"><span class="ticket_filter_item_status_box user_Role_<%# EnumUtility.GetEnumNiceName((UserManagement.ShortRole)Eval("Role"))%>"><span class="ticket_filter_item_data">
                        <%# EnumUtility.GetEnumNiceName((UserManagement.Role)Eval("Role")) %>
                    </span></span></span><!-- Email -->
                    <div class="listview_User_Email lesser_data"><%# Eval("Email")%></div>
                    <!-- Organization -->
                    <div class="listview_User_Organization lesser_data"><%# Eval("Organization")%></div>
                   <!-- AvatarImage -->
                    <span class="ticket_filter_item_tv_type">
                        <img alt=""  class="agent_icon_button vtip" src="/avatar/<%# Eval("AvatarImage") %>.png" />
                    </span><!-- Email -->
                    <div class="listview_User_Active lesser_data "><%# ((Eval("IsActive").ToString()=="True")?"Active":"Not Active") %></div>
                    <!-- actions -->
                    <span class="listview_User_Action" style="margin-top: 2px;"><a title="View Profile" class="ticket_filter_item_tv_tip_open ticket_filter_action_open" href="/Profile.aspx?id=<%# Eval("Username") %>" target="_blank">
                        <img alt="" class="agent_icon_button bug-lightbox" src="/images/open.png" height="16" width="16" /></a> <a title="Quick View" class="ticket_filter_item_tv_tip_view" href="/ProfileLite.aspx?id=<%# Eval("Username") %>">
                            <img alt="" class="agent_icon_button" src="/images/view.png" height="16" width="16" /></a> <a title="Send a message" class="ticket_filter_item_tv_tip_resolve" href="/Message.aspx?id=<%# Eval("Username") %>">
                                <img alt="" class="agent_icon_button" src="/images/email.png" height="16" width="16" /></a> </span>
                </div>
            </ItemTemplate>
        </asp:ListView>
        <asp:LinqDataSource ID="LinqDataSource1" runat="server">
            <%--ContextTypeName="KillDaBugsDataContext" EntityTypeName=""
            Select="new (Username, Fullname, Email, Role, IsActive, Organization, AvatarImage)"
            TableName="Users" OrderBy="Fullname desc" Where="Username== @Username">
               <WhereParameters>
                    <asp:ControlParameter ControlID="txtSearch" Name="Username" PropertyName="Text"
                        Type="String" />
                </WhereParameters>--%>
        </asp:LinqDataSource>
    </div>

</asp:Content>